package com.qiandw.demo

import com.qiandw.common.cassandra.AbstractCassandraDao
import com.datastax.driver.core.querybuilder.{QueryBuilder => cqb}
import org.springframework.stereotype.Component

import scala.collection.JavaConverters._

@Component
class DemoSrvImpl extends  AbstractCassandraDao with DemoSrv {


  override def demo(): Unit = {

    val ms = getMapper(classOf[Member]).map(Execute(cqb.select("id", "name", "idno")
      .from("t_member"))).all()

    ms.asScala.foreach(x=>{
      println(x.name)
    })

  }

}
